rtmedia_single_activity_filter

Description

Use this filter if you want to change the HTML of each media getting uploaded to BuddyPress activity by rtMedia.

The function takes 3 parameters:

$html: Final generated HTML.
$media: The media object which was added to the activity and of which HTML is currently being generated.
$status: No use as per now.

For example:

/* @param $html
* @param $media
* @param $status
*
* @return string
*/
function rtmedia_change_single_activity_html( $html, $media, $status ) {
ob_start();
echo "<h1>".$media->media_title."</h1><br>";
echo $html;
return ob_get_clean();
}

add_filter( 'rtmedia_single_activity_filter', 'rtmedia_change_single_activity_html', 10, 3 );